package structure_结构性.filter_pattern_过滤器模式;

import java.util.List;
import java.util.stream.Collectors;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/07/10:01
 * @Description:
 */
public class FilterFemale implements Filter {
	/**
	 * 过滤女士
	 *
	 * @param people
	 * @return
	 */
	@Override public List<Person> filter(List<Person> people) {
		return people.stream().filter(person -> "female".equalsIgnoreCase(person.getGender())).collect(Collectors.toList());
	}
}
